<!--<div id="form-top">-->
<div class="onecolumn">
    <div class="header">
        <span style="color: red; text-align: center; font-weight: bold;">Sửa thông tin bạn đọc</span>
    </div>
    <br class="clear"/>
    <div id="form-top">
        <?php
        $form = $this->form;
        $form->setAttribute('enctype', 'multipart/form-data');
        $form->setAttribute('action', $this->url('add-new-reader/default', array('action' => 'editReader','id' => $userID)));
        $form->prepare();
        echo $this->form()->openTag($form);
        echo $this->formHidden($form->get('roleID'));
        ?>
        <fieldset>
            <legend>Thông tin về bạn đọc</legend>                   
            <p>
                <?php
                echo $this->formLabel($form->get('cardBarcode'));
                echo $this->formInput($form->get('cardBarcode'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formLabel($form->get('fullName'));
                echo $this->formInput($form->get('fullName'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formRow($form->get('classID'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formLabel($form->get('password'));
                echo $this->formInput($form->get('password'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formLabel($form->get('sex'));
                echo $this->formSelect($form->get('sex'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formLabel($form->get('residentAddress'));
                echo $this->formInput($form->get('residentAddress'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formLabel($form->get('birthday'));
                echo $this->formRow($form->get('day'));
                ?>
                <span></span>
                <?php
                echo $this->formRow($form->get('month'));
                ?>
                <span></span>
                <?php
                echo $this->formRow($form->get('year'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formLabel($form->get('nativePlace'));
                echo $this->formInput($form->get('nativePlace'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formLabel($form->get('email'));
                echo $this->formInput($form->get('email'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formRow($form->get('yearLearn'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formLabel($form->get('phoneNumber'));
                echo $this->formInput($form->get('phoneNumber'));
                ?>
            </p>


            <p>
                <?php
                echo $this->formLabel($form->get('isActive'));
                echo $this->formSelect($form->get('isActive'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formRow($form->get('description'));
                ?>
            </p>
            <p>
                <?php
                echo $this->formRow($form->get('profilePhoto'));
                ?>
            </p>
            <div class="viewMessae" style="text-align: center">
                <?php
                if (isset($myMessage)) {
                    foreach ($myMessage as $key => $message) {
                        if ($message == "cardBarcode")
                            echo '<span style="color:red;font-weight:bold">Mã thẻ chỉ là một dãy các chữ số</span><br/>';
                        if ($message == "phoneNumber")
                            echo '<span style="color:red;font-weight:bold">Số điện thoại là một dãy số</span><br/>';
                        if ($message == "saveOK")
                            echo '<span style="color:red;font-weight:bold">Đăng ký bạn đọc thành công</span><br/>';
                        if ($message == "userExist")
                            echo '<span style="color:red;font-weight:bold">Mã bạn đọc này đã tồn tại</span><br/>';
                    }
                }
                ?>
            </div>

            <div id="button-return">
                <?php
                echo $this->formInput($form->get('register'));
                ?>
                <input type="reset" name="reset" value="Reset">
            </div>
        </fieldset>
        <?php echo $this->form()->closeTag($form); ?>
    </div>
</div>